package com.youzan.cloud.component.biz.member.dispatcher;

import com.youzan.cloud.component.biz.member.common.enums.SceneEnum;
import com.youzan.cloud.component.biz.member.common.util.BeanUtil;
import com.youzan.cloud.component.biz.member.dto.BaseResult;
import com.youzan.cloud.component.biz.member.dto.MemberBaseDto;
import com.youzan.cloud.component.biz.member.service.impl.AbstractService;
/**
 * 入口
 * @author liling
 */
public class MemberServiceDispatcher {

    public static BaseResult invoke(String sceneName, MemberBaseDto memberBaseDto){
        Class<? extends AbstractService> serviceClass = SceneEnum.getInfo(sceneName);
        BaseResult result = BeanUtil.getService(serviceClass).execute(memberBaseDto);
        return  result;
    }
}
